from django.urls import path
from app01.views import depart, user, pretty, Admin, account, task, order, chart

urlpatterns = [
    path('', depart.depart_list),
    # 部门管理
    path('depart/list/', depart.depart_list),
    path('depart/add/', depart.depart_add),
    path('depart/delete/', depart.depart_delete),
    # http://127.0.0.1:8000/depart/5/edit/
    path('depart/<int:nid>/edit/', depart.depart_edit),

    # 用户管理
    path('user/list/', user.user_list),
    path('user/add/', user.user_add),
    path('user/model/form/add/', user.user_model_form_add),
    path('user/<int:nid>/edit/', user.user_edit),
    path('user/<int:nid>/delete/', user.user_delete),

    # 靓号管理
    path('pretty/list/', pretty.pretty_list),
    path('pretty/add/', pretty.pretty_add),
    path('pretty/<int:nid>/edit/', pretty.pretty_edit),
    path('pretty/<int:nid>/delete/', pretty.pretty_delete),

    # 管理员账户
    path('admin/list/', Admin.Admin_list),
    path('admin/add/', Admin.Admin_add),
    path('admin/<int:nid>/edit/', Admin.Admin_edit),
    path('admin/<int:nid>/delete/', Admin.Admin_delete),
    path('admin/<int:nid>/reset/', Admin.Admin_reset),

    # 登录
    path('login/', account.login),
    path('logout/', account.logout),
    path('image/code/', account.image_code),

    # 任务管理
    path('task/list/', task.task_list),
    path('task/add/', task.task_add),

    # 订单管理
    path('order/list/', order.order_list),
    path('order/add/', order.order_add),
    path('order/delete/', order.order_delete),
    path('order/edit/', order.order_edit),
    path('order/detail/', order.order_detail),

    path('chart/list/', chart.chart_list),
    path('chart/line/', chart.chart_line),
    path('chart/bar/', chart.chart_bar),
    path('chart/pie/', chart.chart_pie),

    path('chart/highcharts/', chart.highcharts),
]
